# 定义目标文件
TARGET = kvstore

#lib-inc path
appExtendIncDir=./include
#soft-sdk path
pubLocalLib  = ./lib
	
# 定义编译器
CC= gcc
# 定义编译选项
CFLAGS = -Wall -Wextra  
CFLAGS +=  -I$(appExtendIncDir)
#定义链接库选项
LDFLAGS=-L$(pubLocalLib) -lntyco -lpthread -ldl -larray -lrbtree -lhash -lskiptable
# 定义源文件
SRCS = kvstore.c protocol.c kvengine.c
# 定义对象文件
OBJS = $(SRCS:.c=.o)
all: $(TARGET)
$(TARGET): $(OBJS)
	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)	
%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@
	export LD_LIBRARY_PATH=$(pubLocalLib):$LD_LIBRARY_PATH
clean:
	rm -f $(OBJS) $(TARGET)	